package com.wn.common.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "Appointment",description = "预约单实体类")
public class Appointment {
    @ApiModelProperty(example = "1",value = "预约单编号/可不填")
    private Integer id;
    @Size(min=3,max=10)
    @NotBlank
    @ApiModelProperty(example = "tom",value = "下单用户名")
    private String userName;

    @Pattern(regexp = "^1[345678][0-9]{9}$",message = "手机号格式错误！")
    @ApiModelProperty(example = "13512341234",value = "下单用户号码")
    private String phone;

    @Email(message = "邮箱格式错误！")
    @ApiModelProperty(example = "@qq.com",value = "该用户邮箱")
    private String email;

    @NotNull(message = "预约时出现异常！")
    @ApiModelProperty(hidden = true)
    private Integer userId;

    @NotNull(message = "请填写是否使用报销凭证！")
    @ApiModelProperty(example = "0",value = "是否报销凭证 0-不用打印 1-需要打印")
    private Integer expense;

    @NotNull(message = "请填写是否使用优惠券！")
    @ApiModelProperty(example = "0",value = "是否使用优惠券 0-不需要 1-需要使用")
    private Integer discount;
    @ApiModelProperty(example = "0",value = "预约状态 0-预约中 1-已下单 2-已删除")
    private Integer status;

    @ApiModelProperty(hidden = true)
    private Integer createUserId;

    @ApiModelProperty(hidden = true)
    private Date createTime;

    @ApiModelProperty(hidden = true)
    private Integer updateUserId;

    @ApiModelProperty(hidden = true)
    private Date updateTime;

    private String isDeleted;
    //方案id
    private Integer schemeId;
    //方案详情对象
    private Scheme scheme;


    /*以下为前台增加的预约订单需要的数据字段*/
    //下单用户
    private User user;

    //出发地id
    private List<Integer> fromCityIds;
    //出发地
    private String fromCity;
    //目的地id
    private List<Integer> destinationIds;
    //目的地
    private String destination;
    //成人数量
    private Integer manNum;
    //孩子数量
    private Integer childrenNum;
    //旅客总数
    private Integer number;
    //预计出游时间
    private Date startDate;
    //预计回归时间
    private Date endDate;
    //人均预算
    private String perFee;
    //特色定制要求
    private List<String> types;
    private String type;
    //其他要求
    private String textArea;
    //联系人
    private String contactName;
    //联系人电话
    private String contactPhone;
    //微信号
    private String weixin;

    //订单编号
    private Integer orderNumber;
    //订单预约金额
    private String resPrice;


    //要查询的状态的名称
    private List<Integer> statusList;

}
